package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ly.heart.mapper.CarCardMapper;
import com.ly.heart.domain.CarCardEntity;
import com.ly.heart.service.ICarCardService;

import javax.annotation.Resource;

/**
 * 车务油卡过路卡信息Service业务层处理
 *
 * @author cxl
 * @date 2024-09-08
 */
@Service
public class CarCardServiceImpl extends ServiceImpl<CarCardMapper,CarCardEntity> implements ICarCardService {

    @Resource
    private ICarCardService carCardService;

    /**
     * 查询车务油卡过路卡信息
     *
     * @param id 车务油卡过路卡信息ID
     * @return 车务油卡过路卡信息
     */
    @Override
    public CarCardEntity selectCarCardEntityById(String id)
    {
        return carCardService.selectCarCardEntityById(id);
    }

    /**
     * 查询车务油卡过路卡信息列表
     *
     * @param carCardEntity 车务油卡过路卡信息
     * @return 车务油卡过路卡信息
     */
    @Override
    public List<CarCardEntity> selectCarCardEntityList(CarCardEntity carCardEntity)
    {
        return carCardService.selectCarCardEntityList(carCardEntity);
    }

    /**
     * 新增车务油卡过路卡信息
     *
     * @param carCardEntity 车务油卡过路卡信息
     * @return 结果
     */
    @Override
    public int insertCarCardEntity(CarCardEntity carCardEntity)
    {
        carCardEntity.setCreateTime(DateUtils.getNowDate());
        return carCardService.insertCarCardEntity(carCardEntity);
    }

    /**
     * 修改车务油卡过路卡信息
     *
     * @param carCardEntity 车务油卡过路卡信息
     * @return 结果
     */
    @Override
    public int updateCarCardEntity(CarCardEntity carCardEntity)
    {
        carCardEntity.setUpdateTime(DateUtils.getNowDate());
        return carCardService.updateCarCardEntity(carCardEntity);
    }

    /**
     * 批量删除车务油卡过路卡信息
     *
     * @param ids 需要删除的车务油卡过路卡信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCardEntityByIds(String[] ids)
    {
        return carCardService.deleteCarCardEntityByIds(ids);
    }

    /**
     * 删除车务油卡过路卡信息信息
     *
     * @param id 车务油卡过路卡信息ID
     * @return 结果
     */
    @Override
    public int deleteCarCardEntityById(String id)
    {
        return carCardService.deleteCarCardEntityById(id);
    }
}
